package com.woniu.utils.consumer;

import com.woniu.utils.utils.RedisUtil;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@RabbitListener(queues = "del_user_address_queue")
public class DelUserAddressConsumer {
    @Resource
    private RedisUtil redisUtil;
    @RabbitHandler
    public void delCache(String message){
        System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
        System.out.println("我是延迟双删");
        redisUtil.del(message);
    }
}
